import pytest
import time


class TestTime(object):
    def before(self):
        print("开始时间", time.time())  # 获取当前系统时间
        # time.sleep(1)  # 等待1秒钟
    def after(self):
        print("结束时间", time.time())

    def test01(self):
        self.before()
        print("test01")
        self.after()

    def test02(self):
        self.before()
        print("test02")
        self.after()
